<?

require("config.php");
$langname = 'learning_zone';

$table = "cus_basic";

$field = array(

"id",
"username",
"password",

);

$exp = "AND username='$Username' AND Binary password = '$Password'";

$r = unlimitQuery($table,$field,$exp);

//////////////////////////////////////////////////////////////////

//Da

require($rela_path . "bin/db2.php");

$table = "cus_basic";

$field = array(

"id",
"username",
"password",

);

$exp = "AND username='$Username' AND Binary password = '$Password'";

$r1 = unlimitQuery2($table,$field,$exp);

//tw

require($rela_path . "bin/db3.php");

$table = "cus_basic";

$field = array(

"id",
"username",
"password",

);

$exp = "AND username='$Username' AND Binary password = '$Password'";

$r2 = unlimitQuery3($table,$field,$exp);

//////////////////////////////////////////////////////////////////


if (!$r && !$r1) {
	$login=false;
}else{
	$login=true;
}

if ($login==true) {

	session_register("username");

	$username = $Username;

	header("location:welcome.php");
}else{

	echo "<script language=javascript>alert('Incorrect username and password');location='index.php';</script>";

}


require($rela_path . "header.php");
?>










<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <!--<td width="17"><img src="images/shim.gif" width="17" height="1"></td>-->
    <td width="186" valign="top"> 
      <?require("../nav.php")?>
    </td>
    <td width="11"><img src="images/shim.gif" width="11" height="1"></td>
    <td valign="top"> 
      <?require("../menu.php")?>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td align="right"><table width="100%" border="0">
              <tr> 
                <td height="50" class="header">&gt;&gt; <?=$lang['learning_zone']?></td>
              </tr>
            </table></td>
        </tr>
      </table>
      <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td valign="top"> <p><font color="#FF0000"><?=$lang['invalid_login']?></font><br>
              <br>
            </p>
            <p align="center"><a href="index.php"><?=$lang['back']?></a> </p></td>
        </tr>
      </table>
      <br>
      <br> </td>
    <td width="11"><img src="images/shim.gif" width="11" height="1"></td>
    <td width="173" valign="top">
	
	
<?require("../list.php")?>	 
	  
	  
    </td>
    <!--<td width="17"><img src="images/shim.gif" width="17" height="1"></td>-->
  </tr>
</table>





<?require("../footer.php")?>	